﻿using System;
using System.Linq;
using MinesweeperUtility;

namespace MinesweeperConsole
{
    class MinesweeperConsole
    {
        static void Main(string[] args)
        {
            MainMenu menu = new MainMenu();
            menu.GameInfo();

            Minesweeper minesweeper = new Minesweeper(menu.Difficulty, menu.PlayerName);
            minesweeper.Boom += minesweeper_Boom;
            minesweeper.Win += minesweeper_Win;
            minesweeper.GenerateMinesweeper();
            minesweeper.Run();
        }

        static void minesweeper_Win(WinEventArgs e)
        {
            Console.ForegroundColor = e.Color;
            Console.WriteLine(e.Message);
        }

        static private void minesweeper_Boom(BoomEventArgs e)
        {
            Console.ForegroundColor = e.Color;
            Console.WriteLine(e.Message);
        }
    }
}